function [ out, vector ] = breakCost( img, cost )
%BREAKCOST Summary of this function goes here
%   Detailed explanation goes here
[x y] = size(img);
temp = cumsum(img);
a = temp(x,:);
b = double(a > cost);
out = img;
vector = a;
for i=1:x
    out(i,:) = img(i,:).*b;
end
end

